<template>
  <!-- <nav>
    <router-link to="/">Home</router-link> |
    <router-link to="/about">About</router-link>
  </nav>-->

  <router-view />
</template>
<script>
export default {
  created() {
    let store = this.$store;
    window.onbeforeunload = function () {
      sessionStorage.setItem(
        "taglists",
        JSON.stringify(store.state.menutag.taglist)
      );
    };
  },
  mounted() {
    const tag = JSON.parse(sessionStorage.getItem("taglists"));
    if (tag) {
      this.$store.state.menutag.taglist = tag;
    }
    sessionStorage.removeItem("taglist");
  },
};
</script>

<style lang="less" scoped>
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
</style>
